package xhwl.hmo.mall.http.api;

import com.google.gson.Gson;

import okhttp3.RequestBody;
import rx.Observable;
import xhwl.hmo.mall.http.ApiService;
import xhwl.retrofitrx.BaseApi;

/**
 * Created by admin on 2017-11-06.
 */

public class ThumbsUpApi extends BaseApi{
    UpdateAddressReq req;
    public ThumbsUpApi( String member_mobile,String record_id){
        req=new UpdateAddressReq(record_id,member_mobile);
        setShowDialog(true);
        setCancle(false);
    }

    @Override
    protected Observable getObservable() {
        RequestBody requestBody = RequestBody.create(okhttp3.MediaType.parse("application/json; charset=utf-8"), new Gson().toJson(req));
        return retrofit.create(ApiService.class).getForumThumbsUp(requestBody);
    }
    public class UpdateAddressReq {
        private String member_mobile;
        private String record_id;
        public UpdateAddressReq(String record_id,String member_mobile) {
            this.member_mobile = member_mobile;
            this.record_id=record_id;
        }
    }
}
